package com.renjibo.tianchatdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.renjibo.tianchatdemo.view.MyScrollView;

public class HomeActivity extends AppCompatActivity implements MyScrollView.GooneVisible {

    private ImageView personal_background_image;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        MyScrollView personal_scrollView = (MyScrollView) findViewById(R.id.personal_scrollView);
        personal_background_image = (ImageView) findViewById(R.id.personal_background_image);
        personal_scrollView.setImageView(personal_background_image);
        personal_scrollView.setGooneVisible(this);
    }

    @Override
    public void setGone(boolean boo) {
        if (boo)
            personal_background_image.setVisibility(View.GONE);
        else
            personal_background_image.setVisibility(View.VISIBLE);
    }
}
